package com.aididi.handler;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import com.xxl.job.core.log.XxlJobLogger;
import org.springframework.stereotype.Component;
import sun.plugin.javascript.navig.Array;

import java.util.concurrent.TimeUnit;

/**
 * @Auther: zx.xu
 * @Description:
 */
@JobHandler("MyJobHandler")
@Component
public class MyConfigHandler extends IJobHandler{

    @Override
    public ReturnT<String> execute(String s) throws Exception {
        XxlJobLogger.log("starting myhandler...");
        for (int i=0;i<5;i++){
            XxlJobLogger.log("append: {}",i);
            TimeUnit.SECONDS.sleep(2);
        }


        return SUCCESS;
    }
}
